﻿using Jerkymon.Strings;

namespace Jerkymon
{
    public enum ActionTypeEnum
    {

        FirstVisit = 100, // The most expensive one, choose the value wisely. 

        ReVisit = 1000,  // Welcome to revisit as many times as user likes

        Postback = 5000,    // Not must of a problem for us

        AddNewWidget = 100,

        AddNewPage = 100,

    }

    public enum DateInterval
    {
        Year,
        Month,
        Weekday,
        Day,
        Hour,
        Minute,
        Second
    }

    public enum DevelopmentType
    {
        IsLocal,
        IsDevelopment,
        IsProduction
    }

    public enum EnumGender
    {
        [StringValue("Male")]
        Male = 0,
        [StringValue("Female")]
        Female = 1,
    }

    public class  VBtoC
    {
		#region Static Methods (6)
		public static string Left(string param, int length)
        {
            return param.Substring(0, length);
        }

		public static string Mid(string param, int startIndex)
        {
            return param.Substring(startIndex);
        }

		public static string Mid(string param, int startIndex, int length)
        {
            return param.Substring(startIndex, length);
        }

		public static string Right(string param, int length)
        {
            return param.Substring(param.Length - length, length);
        }

		public static object iif(bool expression, object truePart, object falsePart)
        { return expression ? truePart : falsePart; }

		public static T iif<T>(bool expression, T truePart, T falsePart)
        { return expression ? truePart : falsePart; }
		#endregion
    }

    // interface
    public delegate object IIf(bool expression, object truePart , object falsePart);
    //public delegate string Left(string param , int length);
    //public delegate string Mid(string param , int startIndex, int length);
    //public delegate string Mid(string param , int startIndex);
    //public delegate string Right(string param , int length);


    public enum AppBarDockStyle
    {
        None,
        ScreenLeft,
        ScreenTop,
        ScreenRight,
        ScreenBottom
    }
}
